<!DOCTYPE html>
<html lang="en" class="app">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	<title>Laravel-@yield('title')</title>
	<!--[if lt IE 9]> 
		<script src="{{ asset('admin/js/ie/html5shiv.js') }}" cache="false"></script>
		<script src="{{ asset('admin/js/ie/respond.min.js') }}" cache="false"></script>
		<script src="{{ asset('admin/js/ie/excanvas.js') }}" cache="false"></script> 
	<![endif]-->
	<link rel="stylesheet" href="{{ asset('admin/css/app.v2.css') }}" type="text/css" />
	<link rel="stylesheet" href="{{ asset('admin/js/datatables/datatables.css') }}" type="text/css">
	<link rel="stylesheet" href="{{ asset('admin/css/common.css') }}" type="text/css" />
</head>
<body>
	<section class="vbox">
		<!-- 公共头部 -->
		@section('header')
		<header class="bg-dark dk header navbar navbar-fixed-top-xs">
		    <div class="navbar-header aside-md"> <a class="btn btn-link visible-xs" data-toggle="class:nav-off-screen" data-target="#nav"> <i class="fa fa-bars"></i> </a> <a href="#" class="navbar-brand" data-toggle="fullscreen"><img src="{{ asset('admin/images/logo.png') }}" class="m-r-sm">Notebook</a> <a class="btn btn-link visible-xs" data-toggle="dropdown" data-target=".nav-user"> <i class="fa fa-cog"></i> </a> </div>
		    <ul class="nav navbar-nav navbar-right hidden-xs nav-user">
		        <li class="dropdown hidden-xs">
		            <a href="#" class="dropdown-toggle dker" data-toggle="dropdown"><i class="fa fa-fw fa-search"></i></a>
		            <section class="dropdown-menu aside-xl animated fadeInUp">
		                <section class="panel bg-white">
		                    <form role="search">
		                        <div class="form-group wrapper m-b-none">
		                            <div class="input-group">
		                                <input type="text" class="form-control" placeholder="Search">
		                                <span class="input-group-btn">
		                                    <button type="submit" class="btn btn-info btn-icon"><i class="fa fa-search"></i></button>
		                                </span>
		                            </div>
		                        </div>
		                    </form>
		                </section>
		            </section>
		        </li>
		        <li class="dropdown">
		            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
		            	<span class="thumb-sm avatar pull-left">
		            		<img src="{{ asset('admin/images/avatar.jpg') }}"> 
		            	</span>
						@if (\Auth::user())
		            		{{ \Auth::user()->name }}
		            	@else
		            		NULL
		            	@endif
		            	<b class="caret"></b>
		            </a>
		            <ul class="dropdown-menu animated fadeInRight">
		                <span class="arrow top"></span>
		                <li> 
		                	<a href="{{ url('/logout') }}" onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">登出</a>
							<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
                                {{ csrf_field() }}
                            </form>
		                </li>
		            </ul>
		        </li>
		    </ul>
		</header>
		@show
		
		<section>
			<section class="hbox stretch">
				<!-- 公共侧栏菜单 -->
				@section('aside')
				<aside class="bg-dark lter aside-md hidden-print" id="nav">
				    <section class="vbox">
				        <section class="w-f scrollable">
				            <div class="slim-scroll" data-height="auto" data-disable-fade-out="true" data-distance="0" data-size="5px" data-color="#333333">
				                <!-- nav -->
				                <nav class="nav-primary hidden-xs">
				                    <ul class="nav">
				                        <li class="active"> <a href="{{ url('admin/index') }}" class="active"> <i class="fa fa-dashboard icon"> <b class="bg-danger"></b> </i> <span>首页</span> </a> </li>
				                        <li>
				                            <a href="#pages"> <i class="fa fa-file-text icon"> <b class="bg-primary"></b> </i> <span class="pull-right"> <i class="fa fa-angle-down text"></i> <i class="fa fa-angle-up text-active"></i> </span> <span>管理员管理</span> </a>
				                            <ul class="nav lt">
				                                <li> <a href="{{ url('admin/adminlist') }}"> <i class="fa fa-angle-right"></i> <span>管理员列表</span> </a> </li>
				                                <li> <a href="{{ url('admin/adminrole') }}"> <i class="fa fa-angle-right"></i> <span>角色管理</span> </a> </li>
				                            </ul>
				                        </li>
				                        <li> <a href="mail.html"><i class="fa fa-envelope-o icon"> <b class="bg-primary dker"></b> </i> <span>Message</span> </a> </li>
				                    </ul>
				                </nav>
				                <!-- / nav -->
				            </div>
				        </section>
				        <footer class="footer lt hidden-xs b-t b-dark">
				            <a href="#nav" data-toggle="class:nav-xs" class="pull-right btn btn-sm btn-dark btn-icon"> <i class="fa fa-angle-left text"></i> <i class="fa fa-angle-right text-active"></i> </a>
				        </footer>
				    </section>
				</aside>
				@show
				
				<!-- 内容页 -->
				<section id="content">
					<section class="vbox">
						<section class="scrollable padder">
							@yield('content')
						</section>
					</section>
					<a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a>
				</section>
				
			</section>
		</section>
	</section>

	<script src="{{ asset('admin/js/app.v2.js') }}"></script>
	 <!-- Flot charts -->
	<script src="{{ asset('admin/js/charts/sparkline/jquery.sparkline.min.js') }}"></script>
	<script src="{{ asset('admin/js/charts/easypiechart/jquery.easy-pie-chart.js') }}"></script> 
	<script src="{{ asset('admin/js/charts/flot/jquery.flot.min.js') }}"></script> 
	<script src="{{ asset('admin/js/charts/flot/jquery.flot.tooltip.min.js') }}"></script> 
	<script src="{{ asset('admin/js/charts/flot/jquery.flot.grow.js') }}"></script> 
	<script src="{{ asset('admin/js/charts/flot/demo.js') }}"></script>
	<!-- datatables -->
	<script src="{{ asset('admin/js/datatables/jquery.dataTables.min.js') }}"></script>
	<script type="text/javascript">
		// 管理员角色列表
        $('[data-ride="datatables-adminrole"]').dataTable({
        	"language": {
	            "url": "{{ asset('lang/datetable/zh_CN.json') }}"
	        },
            "processing": true,
            "serverSide": true,
            "ajax": {
            	"url": "{{ url('admin/getRoleList') }}",
            	"type": "GET"
            },
            "columnDefs": [{
		        targets: 3,
		        render: function(data, type, row) {
		            return '<a href="#" class="btn btn-info btn-sm"><i class="fa fa-css3"></i> 编辑权限</a>';
		        }
		    }]
        });
    </script>

</body>
</html>